package logic.nodes;

import logic.nodes.damagable.DamagableController;

public class TeamNodeController extends DamagableController {
	
	private static final long serialVersionUID = 1L;
	
	protected TeamNode teamModelNode;
	
	public TeamNodeController(TeamNode node) {
		super(node);
		teamModelNode = node;
	}
	
	@Override
	public void delayedUpdate(float time) {
		super.delayedUpdate(time);
		
		if(teamModelNode.getCurrentEnergy() < teamModelNode.getMaxEnergy()) 
			teamModelNode.increaseEnergy((int)(teamModelNode.getEnergyRecovery() * 1.5f));
	}
}